﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FortuneHeavenBAL;
using FortuneHeaven.Web.Common;

namespace FortuneHeaven.Web.Pages.News
{
    public partial class AllNews : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SetPageHeader(FortuneHeavenCommon.Enum.MainPageTabType.news);
            if (!IsPostBack)
            {
                NewsBO bo = new NewsBO();
                rpNews.DataSource = bo.GetTopNews(6, FortuneHeavenCommon.Enum.NewsType.BroadCast);
                this.rpGame.DataSource = bo.GetTopNews(10, FortuneHeavenCommon.Enum.NewsType.Games);
                this.rpComp.DataSource = bo.GetTopNews(10, FortuneHeavenCommon.Enum.NewsType.Competition);
                Page.DataBind();
            }
        }
    }
}